cmake_minimum_required(VERSION 3.19)
project(offer)

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_FLAGS -Wno-write-strings)

#set(CMAKE_VERBOSE_MAKEFILE 1)
#add_executable(01CMyString 01CMyString.cpp)
#add_executable(02Singleton 02Singleton.cpp)
#add_executable(03duplicate 03duplicate.cpp)
#add_executable(03duplicateNoEdit 03duplicateNoEdit.cpp)
#add_executable(04duplicate 04duplicate.cpp)
#add_executable(05string 05string.cpp)

aux_source_directory(. TEST_SRC_LIST)
foreach(TEST_SRC ${TEST_SRC_LIST})
    message("src:${TEST_SRC}")
    STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC})
    message(STATUS "test app:${TEST_EXE_NAME}")
    add_executable(${TEST_EXE_NAME} ${TEST_SRC})
endforeach()